package org.hxyjs.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class OrderFormExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public OrderFormExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        protected void addCriterionForJDBCTime(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Time(value.getTime()), property);
        }

        protected void addCriterionForJDBCTime(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Time> timeList = new ArrayList<java.sql.Time>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                timeList.add(new java.sql.Time(iter.next().getTime()));
            }
            addCriterion(condition, timeList, property);
        }

        protected void addCriterionForJDBCTime(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Time(value1.getTime()), new java.sql.Time(value2.getTime()), property);
        }

        public Criteria andUrnoIsNull() {
            addCriterion("urno is null");
            return (Criteria) this;
        }

        public Criteria andUrnoIsNotNull() {
            addCriterion("urno is not null");
            return (Criteria) this;
        }

        public Criteria andUrnoEqualTo(String value) {
            addCriterion("urno =", value, "urno");
            return (Criteria) this;
        }

        public Criteria andUrnoNotEqualTo(String value) {
            addCriterion("urno <>", value, "urno");
            return (Criteria) this;
        }

        public Criteria andUrnoGreaterThan(String value) {
            addCriterion("urno >", value, "urno");
            return (Criteria) this;
        }

        public Criteria andUrnoGreaterThanOrEqualTo(String value) {
            addCriterion("urno >=", value, "urno");
            return (Criteria) this;
        }

        public Criteria andUrnoLessThan(String value) {
            addCriterion("urno <", value, "urno");
            return (Criteria) this;
        }

        public Criteria andUrnoLessThanOrEqualTo(String value) {
            addCriterion("urno <=", value, "urno");
            return (Criteria) this;
        }

        public Criteria andUrnoLike(String value) {
            addCriterion("urno like", value, "urno");
            return (Criteria) this;
        }

        public Criteria andUrnoNotLike(String value) {
            addCriterion("urno not like", value, "urno");
            return (Criteria) this;
        }

        public Criteria andUrnoIn(List<String> values) {
            addCriterion("urno in", values, "urno");
            return (Criteria) this;
        }

        public Criteria andUrnoNotIn(List<String> values) {
            addCriterion("urno not in", values, "urno");
            return (Criteria) this;
        }

        public Criteria andUrnoBetween(String value1, String value2) {
            addCriterion("urno between", value1, value2, "urno");
            return (Criteria) this;
        }

        public Criteria andUrnoNotBetween(String value1, String value2) {
            addCriterion("urno not between", value1, value2, "urno");
            return (Criteria) this;
        }

        public Criteria andUnoIsNull() {
            addCriterion("uno is null");
            return (Criteria) this;
        }

        public Criteria andUnoIsNotNull() {
            addCriterion("uno is not null");
            return (Criteria) this;
        }

        public Criteria andUnoEqualTo(String value) {
            addCriterion("uno =", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoNotEqualTo(String value) {
            addCriterion("uno <>", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoGreaterThan(String value) {
            addCriterion("uno >", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoGreaterThanOrEqualTo(String value) {
            addCriterion("uno >=", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoLessThan(String value) {
            addCriterion("uno <", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoLessThanOrEqualTo(String value) {
            addCriterion("uno <=", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoLike(String value) {
            addCriterion("uno like", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoNotLike(String value) {
            addCriterion("uno not like", value, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoIn(List<String> values) {
            addCriterion("uno in", values, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoNotIn(List<String> values) {
            addCriterion("uno not in", values, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoBetween(String value1, String value2) {
            addCriterion("uno between", value1, value2, "uno");
            return (Criteria) this;
        }

        public Criteria andUnoNotBetween(String value1, String value2) {
            addCriterion("uno not between", value1, value2, "uno");
            return (Criteria) this;
        }

        public Criteria andRnoIsNull() {
            addCriterion("rno is null");
            return (Criteria) this;
        }

        public Criteria andRnoIsNotNull() {
            addCriterion("rno is not null");
            return (Criteria) this;
        }

        public Criteria andRnoEqualTo(String value) {
            addCriterion("rno =", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoNotEqualTo(String value) {
            addCriterion("rno <>", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoGreaterThan(String value) {
            addCriterion("rno >", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoGreaterThanOrEqualTo(String value) {
            addCriterion("rno >=", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoLessThan(String value) {
            addCriterion("rno <", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoLessThanOrEqualTo(String value) {
            addCriterion("rno <=", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoLike(String value) {
            addCriterion("rno like", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoNotLike(String value) {
            addCriterion("rno not like", value, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoIn(List<String> values) {
            addCriterion("rno in", values, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoNotIn(List<String> values) {
            addCriterion("rno not in", values, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoBetween(String value1, String value2) {
            addCriterion("rno between", value1, value2, "rno");
            return (Criteria) this;
        }

        public Criteria andRnoNotBetween(String value1, String value2) {
            addCriterion("rno not between", value1, value2, "rno");
            return (Criteria) this;
        }

        public Criteria andUrespriceIsNull() {
            addCriterion("uresprice is null");
            return (Criteria) this;
        }

        public Criteria andUrespriceIsNotNull() {
            addCriterion("uresprice is not null");
            return (Criteria) this;
        }

        public Criteria andUrespriceEqualTo(String value) {
            addCriterion("uresprice =", value, "uresprice");
            return (Criteria) this;
        }

        public Criteria andUrespriceNotEqualTo(String value) {
            addCriterion("uresprice <>", value, "uresprice");
            return (Criteria) this;
        }

        public Criteria andUrespriceGreaterThan(String value) {
            addCriterion("uresprice >", value, "uresprice");
            return (Criteria) this;
        }

        public Criteria andUrespriceGreaterThanOrEqualTo(String value) {
            addCriterion("uresprice >=", value, "uresprice");
            return (Criteria) this;
        }

        public Criteria andUrespriceLessThan(String value) {
            addCriterion("uresprice <", value, "uresprice");
            return (Criteria) this;
        }

        public Criteria andUrespriceLessThanOrEqualTo(String value) {
            addCriterion("uresprice <=", value, "uresprice");
            return (Criteria) this;
        }

        public Criteria andUrespriceLike(String value) {
            addCriterion("uresprice like", value, "uresprice");
            return (Criteria) this;
        }

        public Criteria andUrespriceNotLike(String value) {
            addCriterion("uresprice not like", value, "uresprice");
            return (Criteria) this;
        }

        public Criteria andUrespriceIn(List<String> values) {
            addCriterion("uresprice in", values, "uresprice");
            return (Criteria) this;
        }

        public Criteria andUrespriceNotIn(List<String> values) {
            addCriterion("uresprice not in", values, "uresprice");
            return (Criteria) this;
        }

        public Criteria andUrespriceBetween(String value1, String value2) {
            addCriterion("uresprice between", value1, value2, "uresprice");
            return (Criteria) this;
        }

        public Criteria andUrespriceNotBetween(String value1, String value2) {
            addCriterion("uresprice not between", value1, value2, "uresprice");
            return (Criteria) this;
        }

        public Criteria andUrestimeIsNull() {
            addCriterion("uresTime is null");
            return (Criteria) this;
        }

        public Criteria andUrestimeIsNotNull() {
            addCriterion("uresTime is not null");
            return (Criteria) this;
        }

        public Criteria andUrestimeEqualTo(Date value) {
            addCriterionForJDBCTime("uresTime =", value, "urestime");
            return (Criteria) this;
        }

        public Criteria andUrestimeNotEqualTo(Date value) {
            addCriterionForJDBCTime("uresTime <>", value, "urestime");
            return (Criteria) this;
        }

        public Criteria andUrestimeGreaterThan(Date value) {
            addCriterionForJDBCTime("uresTime >", value, "urestime");
            return (Criteria) this;
        }

        public Criteria andUrestimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("uresTime >=", value, "urestime");
            return (Criteria) this;
        }

        public Criteria andUrestimeLessThan(Date value) {
            addCriterionForJDBCTime("uresTime <", value, "urestime");
            return (Criteria) this;
        }

        public Criteria andUrestimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("uresTime <=", value, "urestime");
            return (Criteria) this;
        }

        public Criteria andUrestimeIn(List<Date> values) {
            addCriterionForJDBCTime("uresTime in", values, "urestime");
            return (Criteria) this;
        }

        public Criteria andUrestimeNotIn(List<Date> values) {
            addCriterionForJDBCTime("uresTime not in", values, "urestime");
            return (Criteria) this;
        }

        public Criteria andUrestimeBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("uresTime between", value1, value2, "urestime");
            return (Criteria) this;
        }

        public Criteria andUrestimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("uresTime not between", value1, value2, "urestime");
            return (Criteria) this;
        }

        public Criteria andUresdateIsNull() {
            addCriterion("uresDate is null");
            return (Criteria) this;
        }

        public Criteria andUresdateIsNotNull() {
            addCriterion("uresDate is not null");
            return (Criteria) this;
        }

        public Criteria andUresdateEqualTo(Date value) {
            addCriterionForJDBCDate("uresDate =", value, "uresdate");
            return (Criteria) this;
        }

        public Criteria andUresdateNotEqualTo(Date value) {
            addCriterionForJDBCDate("uresDate <>", value, "uresdate");
            return (Criteria) this;
        }

        public Criteria andUresdateGreaterThan(Date value) {
            addCriterionForJDBCDate("uresDate >", value, "uresdate");
            return (Criteria) this;
        }

        public Criteria andUresdateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("uresDate >=", value, "uresdate");
            return (Criteria) this;
        }

        public Criteria andUresdateLessThan(Date value) {
            addCriterionForJDBCDate("uresDate <", value, "uresdate");
            return (Criteria) this;
        }

        public Criteria andUresdateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("uresDate <=", value, "uresdate");
            return (Criteria) this;
        }

        public Criteria andUresdateIn(List<Date> values) {
            addCriterionForJDBCDate("uresDate in", values, "uresdate");
            return (Criteria) this;
        }

        public Criteria andUresdateNotIn(List<Date> values) {
            addCriterionForJDBCDate("uresDate not in", values, "uresdate");
            return (Criteria) this;
        }

        public Criteria andUresdateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("uresDate between", value1, value2, "uresdate");
            return (Criteria) this;
        }

        public Criteria andUresdateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("uresDate not between", value1, value2, "uresdate");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}